﻿#include "FlowTree.h"

namespace CVV
{

namespace Interface
{


FlowTree::FlowTree(QObject *parent)
    : QObject(parent)
{

}

FlowTree::~FlowTree()
{

}

FlowTree::FlowTree(const FlowTree &flowTree)
{
    if (this == &flowTree)
    {
        return;
    }

    this->m_cellId = flowTree.cellId();
    this->m_level = flowTree.level();
    this->m_pluginCode = flowTree.pluginCode();
    this->m_pluginName = flowTree.pluginName();
    this->m_strPreCellId = flowTree.preCellId();
}

FlowTree& FlowTree::operator=(const FlowTree &flowTree)
{
    if (this == &flowTree)
    {
        return *this;
    }

    this->m_cellId = flowTree.cellId();
    this->m_level = flowTree.level();
    this->m_pluginCode = flowTree.pluginCode();
    this->m_pluginName = flowTree.pluginName();
    this->m_strPreCellId = flowTree.preCellId();

    return *this;
}

bool FlowTree::operator ==(const FlowTree &flowTree) const
{
    if (this == &flowTree)
    {
        return true;
    }

    if (this->m_cellId == flowTree.cellId()
            && this->m_level == flowTree.level()
            && this->m_pluginCode == flowTree.pluginCode()
            && this->m_pluginName == flowTree.pluginName()
            && this->m_strPreCellId == flowTree.preCellId())
    {
        return true;
    }

    return false;
}

QString FlowTree::pluginCode() const
{
    return m_pluginCode;
}

void FlowTree::setPluginCode(const QString &pluginCode)
{
    m_pluginCode = pluginCode;
}


int FlowTree::level() const
{
    return m_level;
}

void FlowTree::setLevel(const int &level)
{
    m_level = level;
}

QString FlowTree::cellId() const
{
    return m_cellId;
}

void FlowTree::setCellId(const QString &cellId)
{
    m_cellId = cellId;
}

QString FlowTree::pluginName() const
{
    return m_pluginName;
}

void FlowTree::setPluginName(const QString &pluginName)
{
    m_pluginName = pluginName;
}

QString FlowTree::preCellId() const
{
    return m_strPreCellId;
}

void FlowTree::setPreCellId(const QString &preId)
{
    m_strPreCellId = preId;
}

}

}
